load("@rules_java//java:defs.bzl", "java_library")
load("//:cel_android_rules.bzl", "cel_android_library")

package(
    default_applicable_licenses = ["//:license"],
    default_visibility = [
        "//publish:__pkg__",
        "//runtime:__pkg__",
    ],
)

# keep sorted
BASE_SOURCES = [
    "DefaultMetadata.java",
    "MessageProvider.java",
    "Registrar.java",
]

# keep sorted
INTERPRETER_SOURCES = [
    "CallArgumentChecker.java",
    "DefaultInterpreter.java",
    "Interpreter.java",
    "RuntimeUnknownResolver.java",
    "UnknownTrackingInterpretable.java",
]

# keep sorted
DESCRIPTOR_MESSAGE_PROVIDER_SOURCES = [
    "DescriptorMessageProvider.java",
    "DynamicMessageFactory.java",
    "MessageFactory.java",
]

# keep sorted
LITE_RUNTIME_SOURCES = [
    "CelLiteRuntime.java",
    "CelLiteRuntimeBuilder.java",
    "CelLiteRuntimeLibrary.java",
]

# keep sorted
LITE_RUNTIME_IMPL_SOURCES = [
    "LiteProgramImpl.java",
    "LiteRuntimeImpl.java",
]

# keep sorted
FUNCTION_BINDING_SOURCES = [
    "CelFunctionBinding.java",
    "FunctionBindingImpl.java",
]

# keep sorted
FUNCTION_OVERLOAD_IMPL_SOURCES = [
    "FunctionOverload.java",
    "FunctionResolver.java",
    "ResolvedOverload.java",
]

# keep sorted
INTERPRABLE_SOURCES = [
    "GlobalResolver.java",
    "Interpretable.java",
]

# keep sorted
DISPATCHER_SOURCES = [
    "DefaultDispatcher.java",
    "Dispatcher.java",
]

java_library(
    name = "runtime_type_provider",
    srcs = ["RuntimeTypeProvider.java"],
    tags = [
    ],
    deps = [
        ":base",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

cel_android_library(
    name = "runtime_type_provider_android",
    srcs = ["RuntimeTypeProvider.java"],
    visibility = ["//visibility:private"],
    deps = [
        ":base_android",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "descriptor_message_provider",
    srcs = DESCRIPTOR_MESSAGE_PROVIDER_SOURCES,
    tags = [
    ],
    deps = [
        ":runtime_type_provider",
        "//common:cel_descriptors",
        "//common:error_codes",
        "//common:options",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/internal:cel_descriptor_pools",
        "//common/internal:default_message_factory",
        "//common/internal:dynamic_proto",
        "//common/internal:proto_message_factory",
        "//common/types:cel_types",
        "//common/values:cel_byte_string",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:org_jspecify_jspecify",
    ],
)

java_library(
    name = "dispatcher",
    srcs = DISPATCHER_SOURCES,
    tags = [
    ],
    deps = [
        ":base",
        ":evaluation_exception",
        ":evaluation_exception_builder",
        ":function_overload_impl",
        "//:auto_value",
        "//common:error_codes",
        "//common/annotations",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

cel_android_library(
    name = "dispatcher_android",
    srcs = DISPATCHER_SOURCES,
    visibility = ["//visibility:private"],
    deps = [
        ":base_android",
        ":evaluation_exception",
        ":evaluation_exception_builder",
        ":function_overload_impl_android",
        "//:auto_value",
        "//common:error_codes",
        "//common/annotations",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven_android//:com_google_guava_guava",
    ],
)

java_library(
    name = "activation",
    srcs = ["Activation.java"],
    tags = [
    ],
    deps = [
        ":interpretable",
        ":runtime_helpers",
        "//common/annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:org_jspecify_jspecify",
    ],
)

cel_android_library(
    name = "activation_android",
    srcs = ["Activation.java"],
    visibility = ["//visibility:private"],
    deps = [
        ":interpretable_android",
        ":runtime_helpers_android",
        "//common/annotations",
        "@maven//:org_jspecify_jspecify",
        "@maven_android//:com_google_guava_guava",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "proto_message_activation_factory",
    srcs = ["ProtoMessageActivationFactory.java"],
    tags = [
    ],
    deps = [
        ":activation",
        ":evaluation_exception_builder",
        "//common:options",
        "//common/internal:default_message_factory",
        "//common/internal:dynamic_proto",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "type_resolver",
    srcs = ["TypeResolver.java"],
    tags = [
    ],
    deps = [
        "//common/types",
        "//common/types:type_providers",
        "//common/values:cel_byte_string",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

cel_android_library(
    name = "type_resolver_android",
    srcs = ["TypeResolver.java"],
    visibility = ["//visibility:private"],
    deps = [
        "//common/types:type_providers_android",
        "//common/types:types_android",
        "//common/values:cel_byte_string",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven_android//:com_google_guava_guava",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "descriptor_type_resolver",
    srcs = ["DescriptorTypeResolver.java"],
    visibility = ["//visibility:private"],
    deps = [
        ":type_resolver",
        "//common/types",
        "//common/types:type_providers",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "base",
    srcs = BASE_SOURCES,
    tags = [
    ],
    deps = [
        ":function_overload_impl",
        ":metadata",
        "//common:cel_ast",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

cel_android_library(
    name = "base_android",
    srcs = BASE_SOURCES,
    visibility = ["//visibility:private"],
    deps = [
        ":function_overload_impl_android",
        ":metadata",
        "//common:cel_ast_android",
        "//common/annotations",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven_android//:com_google_guava_guava",
    ],
)

java_library(
    name = "interpreter",
    srcs = INTERPRETER_SOURCES,
    tags = [
    ],
    exports = [":base"],
    deps = [
        ":accumulated_unknowns",
        ":base",
        ":concatenated_list_view",
        ":dispatcher",
        ":evaluation_exception",
        ":evaluation_exception_builder",
        ":evaluation_listener",
        ":function_overload_impl",
        ":interpretable",
        ":interpreter_util",
        ":metadata",
        ":runtime_helpers",
        ":runtime_type_provider",
        ":type_resolver",
        ":unknown_attributes",
        "//:auto_value",
        "//common:cel_ast",
        "//common:error_codes",
        "//common:options",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/ast",
        "//common/types",
        "//common/types:type_providers",
        "//common/values:cel_byte_string",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:org_jspecify_jspecify",
    ],
)

cel_android_library(
    name = "interpreter_android",
    srcs = INTERPRETER_SOURCES,
    visibility = ["//visibility:private"],
    deps = [
        ":accumulated_unknowns_android",
        ":base_android",
        ":concatenated_list_view",
        ":dispatcher_android",
        ":evaluation_exception",
        ":evaluation_exception_builder",
        ":evaluation_listener_android",
        ":function_overload_impl_android",
        ":interpretable_android",
        ":interpreter_util_android",
        ":metadata",
        ":runtime_helpers_android",
        ":runtime_type_provider_android",
        ":type_resolver_android",
        ":unknown_attributes_android",
        "//:auto_value",
        "//common:cel_ast_android",
        "//common:error_codes",
        "//common:options",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/ast:ast_android",
        "//common/types:type_providers_android",
        "//common/types:types_android",
        "//common/values:cel_byte_string",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven_android//:com_google_guava_guava",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "runtime_equality",
    srcs = [
        "RuntimeEquality.java",
    ],
    tags = [
    ],
    deps = [
        ":runtime_helpers",
        "//common:error_codes",
        "//common:options",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/internal:comparison_functions",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

cel_android_library(
    name = "runtime_equality_android",
    srcs = ["RuntimeEquality.java"],
    tags = [
    ],
    deps = [
        ":runtime_helpers_android",
        "//common:error_codes",
        "//common:options",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/internal:comparison_functions_android",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven_android//:com_google_guava_guava",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "proto_message_runtime_equality",
    srcs = [
        "ProtoMessageRuntimeEquality.java",
    ],
    tags = [
    ],
    deps = [
        ":proto_message_runtime_helpers",
        ":runtime_equality",
        "//common:options",
        "//common/annotations",
        "//common/internal:dynamic_proto",
        "//common/internal:proto_equality",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

cel_android_library(
    name = "runtime_helpers_android",
    srcs = ["RuntimeHelpers.java"],
    tags = [
    ],
    deps = [
        ":concatenated_list_view",
        "//common:error_codes",
        "//common:options",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/internal:converter",
        "//common/values:values_android",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_re2j_re2j",
        "@maven//:org_threeten_threeten_extra",
        "@maven_android//:com_google_guava_guava",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "runtime_helpers",
    srcs = [
        "RuntimeHelpers.java",
    ],
    tags = [
    ],
    deps = [
        ":concatenated_list_view",
        "//common:error_codes",
        "//common:options",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/internal:converter",
        "//common/values",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_re2j_re2j",
        "@maven//:org_threeten_threeten_extra",
    ],
)

java_library(
    name = "proto_message_runtime_helpers",
    srcs = [
        "ProtoMessageRuntimeHelpers.java",
    ],
    tags = [
    ],
    deps = [
        ":runtime_helpers",
        "//common:options",
        "//common/annotations",
        "//common/internal:dynamic_proto",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

# keep sorted
RUNTIME_SOURCES = [
    "CelInternalRuntimeLibrary.java",
    "CelRuntime.java",
    "CelRuntimeBuilder.java",
    "CelRuntimeFactory.java",
    "CelRuntimeLegacyImpl.java",
    "CelRuntimeLibrary.java",
    "CelVariableResolver.java",
    "HierarchicalVariableResolver.java",
    "ProgramImpl.java",
    "UnknownContext.java",
]

LATE_FUNCTION_BINDING_SOURCES = [
    "CelLateFunctionBindings.java",
    "CelResolvedOverload.java",
]

java_library(
    name = "late_function_binding",
    srcs = LATE_FUNCTION_BINDING_SOURCES,
    tags = [
    ],
    deps = [
        ":dispatcher",
        ":evaluation_exception",
        ":function_binding",
        ":function_overload",
        ":function_overload_impl",
        ":function_resolver",
        "//:auto_value",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

cel_android_library(
    name = "late_function_binding_android",
    srcs = LATE_FUNCTION_BINDING_SOURCES,
    tags = [
    ],
    deps = [
        ":dispatcher_android",
        ":evaluation_exception",
        ":function_binding_android",
        ":function_overload_android",
        ":function_overload_impl_android",
        ":function_resolver_android",
        "//:auto_value",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven_android//:com_google_guava_guava",
    ],
)

java_library(
    name = "lite_runtime_library",
    srcs = ["CelLiteRuntimeLibrary.java"],
    deps = [":lite_runtime"],
)

cel_android_library(
    name = "lite_runtime_library_android",
    srcs = ["CelLiteRuntimeLibrary.java"],
    deps = [":lite_runtime_android"],
)

java_library(
    name = "evaluation_exception",
    srcs = [
        "CelEvaluationException.java",
    ],
    # used_by_android
    tags = [
    ],
    deps = [
        "//common:cel_exception",
        "//common:error_codes",
        "@maven//:org_jspecify_jspecify",
    ],
)

java_library(
    name = "evaluation_exception_builder",
    srcs = ["CelEvaluationExceptionBuilder.java"],
    # used_by_android
    tags = [
    ],
    deps = [
        ":evaluation_exception",
        ":metadata",
        "//common:error_codes",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/internal:safe_string_formatter",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:org_jspecify_jspecify",
    ],
)

java_library(
    name = "metadata",
    srcs = ["Metadata.java"],
    # used_by_android
    deps = [
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "interpretable",
    srcs = INTERPRABLE_SOURCES,
    deps = [
        ":evaluation_exception",
        ":evaluation_listener",
        ":function_overload_impl",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:org_jspecify_jspecify",
    ],
)

cel_android_library(
    name = "interpretable_android",
    srcs = INTERPRABLE_SOURCES,
    visibility = ["//visibility:private"],
    deps = [
        ":evaluation_exception",
        ":evaluation_listener_android",
        ":function_overload_impl_android",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:org_jspecify_jspecify",
    ],
)

java_library(
    name = "standard_functions",
    srcs = ["CelStandardFunctions.java"],
    tags = [
    ],
    deps = [
        ":function_binding",
        ":runtime_equality",
        "//common:options",
        "//common/annotations",
        "//runtime/standard:add",
        "//runtime/standard:bool",
        "//runtime/standard:bytes",
        "//runtime/standard:contains",
        "//runtime/standard:divide",
        "//runtime/standard:double",
        "//runtime/standard:duration",
        "//runtime/standard:dyn",
        "//runtime/standard:ends_with",
        "//runtime/standard:equals",
        "//runtime/standard:get_date",
        "//runtime/standard:get_day_of_month",
        "//runtime/standard:get_day_of_week",
        "//runtime/standard:get_day_of_year",
        "//runtime/standard:get_full_year",
        "//runtime/standard:get_hours",
        "//runtime/standard:get_milliseconds",
        "//runtime/standard:get_minutes",
        "//runtime/standard:get_month",
        "//runtime/standard:get_seconds",
        "//runtime/standard:greater",
        "//runtime/standard:greater_equals",
        "//runtime/standard:in",
        "//runtime/standard:index",
        "//runtime/standard:int",
        "//runtime/standard:less",
        "//runtime/standard:less_equals",
        "//runtime/standard:logical_not",
        "//runtime/standard:matches",
        "//runtime/standard:modulo",
        "//runtime/standard:multiply",
        "//runtime/standard:negate",
        "//runtime/standard:not_equals",
        "//runtime/standard:size",
        "//runtime/standard:standard_function",
        "//runtime/standard:starts_with",
        "//runtime/standard:string",
        "//runtime/standard:subtract",
        "//runtime/standard:timestamp",
        "//runtime/standard:uint",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

cel_android_library(
    name = "standard_functions_android",
    srcs = ["CelStandardFunctions.java"],
    tags = [
    ],
    deps = [
        ":function_binding_android",
        ":runtime_equality_android",
        "//common:options",
        "//common/annotations",
        "//runtime/standard:add_android",
        "//runtime/standard:bool_android",
        "//runtime/standard:bytes_android",
        "//runtime/standard:contains_android",
        "//runtime/standard:divide_android",
        "//runtime/standard:double_android",
        "//runtime/standard:duration_android",
        "//runtime/standard:dyn_android",
        "//runtime/standard:ends_with_android",
        "//runtime/standard:equals_android",
        "//runtime/standard:get_date_android",
        "//runtime/standard:get_day_of_month_android",
        "//runtime/standard:get_day_of_week_android",
        "//runtime/standard:get_day_of_year_android",
        "//runtime/standard:get_full_year_android",
        "//runtime/standard:get_hours_android",
        "//runtime/standard:get_milliseconds_android",
        "//runtime/standard:get_minutes_android",
        "//runtime/standard:get_month_android",
        "//runtime/standard:get_seconds_android",
        "//runtime/standard:greater_android",
        "//runtime/standard:greater_equals_android",
        "//runtime/standard:in_android",
        "//runtime/standard:index_android",
        "//runtime/standard:int_android",
        "//runtime/standard:less_android",
        "//runtime/standard:less_equals_android",
        "//runtime/standard:logical_not_android",
        "//runtime/standard:matches_android",
        "//runtime/standard:modulo_android",
        "//runtime/standard:multiply_android",
        "//runtime/standard:negate_android",
        "//runtime/standard:not_equals_android",
        "//runtime/standard:size_android",
        "//runtime/standard:standard_function_android",
        "//runtime/standard:starts_with_android",
        "//runtime/standard:string_android",
        "//runtime/standard:subtract_android",
        "//runtime/standard:timestamp_android",
        "//runtime/standard:uint_android",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven_android//:com_google_guava_guava",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "function_binding",
    srcs = FUNCTION_BINDING_SOURCES,
    tags = [
    ],
    deps = [
        ":function_overload",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

cel_android_library(
    name = "function_binding_android",
    srcs = FUNCTION_BINDING_SOURCES,
    tags = [
    ],
    deps = [
        ":function_overload_android",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven_android//:com_google_guava_guava",
    ],
)

java_library(
    name = "function_resolver",
    srcs = ["CelFunctionResolver.java"],
    tags = [
    ],
    deps = [
        ":function_overload_impl",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

cel_android_library(
    name = "function_resolver_android",
    srcs = ["CelFunctionResolver.java"],
    deps = [
        ":function_overload_impl_android",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "function_overload",
    srcs = [
        "CelFunctionOverload.java",
    ],
    tags = [
    ],
    deps = [
        ":function_overload_impl",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

cel_android_library(
    name = "function_overload_android",
    srcs = [
        "CelFunctionOverload.java",
    ],
    deps = [
        ":function_overload_impl_android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "function_overload_impl",
    srcs = FUNCTION_OVERLOAD_IMPL_SOURCES,
    tags = [
    ],
    deps = [
        ":evaluation_exception",
        "//common/annotations",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

cel_android_library(
    name = "function_overload_impl_android",
    srcs = FUNCTION_OVERLOAD_IMPL_SOURCES,
    deps = [
        ":evaluation_exception",
        "//common/annotations",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "runtime",
    srcs = RUNTIME_SOURCES,
    tags = [
    ],
    deps = [
        ":activation",
        ":cel_value_runtime_type_provider",
        ":descriptor_message_provider",
        ":descriptor_type_resolver",
        ":dispatcher",
        ":evaluation_exception",
        ":evaluation_listener",
        ":function_binding",
        ":function_resolver",
        ":interpretable",
        ":interpreter",
        ":lite_runtime",
        ":proto_message_activation_factory",
        ":proto_message_runtime_equality",
        ":runtime_equality",
        ":runtime_type_provider",
        ":standard_functions",
        ":unknown_attributes",
        "//:auto_value",
        "//common:cel_ast",
        "//common:cel_descriptors",
        "//common:options",
        "//common/annotations",
        "//common/internal:cel_descriptor_pools",
        "//common/internal:default_message_factory",
        "//common/internal:dynamic_proto",
        "//common/internal:proto_message_factory",
        "//common/types:cel_types",
        "//common/values:cel_value_provider",
        "//common/values:proto_message_value_provider",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:org_jspecify_jspecify",
    ],
)

java_library(
    name = "lite_runtime",
    srcs = LITE_RUNTIME_SOURCES,
    tags = [
    ],
    deps = [
        ":evaluation_exception",
        ":function_binding",
        ":function_resolver",
        "//:auto_value",
        "//common:cel_ast",
        "//common:options",
        "//common/annotations",
        "//common/values:cel_value_provider",
        "//runtime/standard:standard_function",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "lite_runtime_impl",
    srcs = LITE_RUNTIME_IMPL_SOURCES,
    tags = [
    ],
    deps = [
        ":activation",
        ":cel_value_runtime_type_provider",
        ":dispatcher",
        ":evaluation_exception",
        ":function_binding",
        ":function_resolver",
        ":interpretable",
        ":interpreter",
        ":lite_runtime",
        ":runtime_equality",
        ":runtime_helpers",
        ":type_resolver",
        "//:auto_value",
        "//common:cel_ast",
        "//common:options",
        "//common/values:cel_value_provider",
        "//runtime/standard:standard_function",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

cel_android_library(
    name = "lite_runtime_impl_android",
    srcs = LITE_RUNTIME_IMPL_SOURCES,
    tags = [
    ],
    deps = [
        ":activation_android",
        ":cel_value_runtime_type_provider_android",
        ":dispatcher_android",
        ":evaluation_exception",
        ":function_binding_android",
        ":function_resolver_android",
        ":interpretable_android",
        ":interpreter_android",
        ":lite_runtime_android",
        ":runtime_equality_android",
        ":runtime_helpers_android",
        ":type_resolver_android",
        "//:auto_value",
        "//common:cel_ast_android",
        "//common:options",
        "//common/values:cel_value_provider_android",
        "//runtime/standard:standard_function_android",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven_android//:com_google_guava_guava",
    ],
)

java_library(
    name = "lite_runtime_factory",
    srcs = [
        "CelLiteRuntimeFactory.java",
    ],
    tags = [
    ],
    deps = [
        ":lite_runtime",
        ":lite_runtime_impl",
        "//common/annotations",
    ],
)

cel_android_library(
    name = "lite_runtime_factory_android",
    srcs = [
        "CelLiteRuntimeFactory.java",
    ],
    tags = [
    ],
    deps = [
        ":lite_runtime_android",
        ":lite_runtime_impl_android",
        "//common/annotations",
    ],
)

# keep sorted
UNKNOWN_ATTRIBUTE_SOURCES = [
    "CelAttribute.java",
    "CelAttributePattern.java",
    "CelAttributeResolver.java",
    "CelUnknownSet.java",
]

# keep sorted
UNKNOWN_OPTIONS_SOURCES = [
    "CelAttributeParser.java",
]

java_library(
    name = "unknown_options",
    srcs = UNKNOWN_OPTIONS_SOURCES,
    tags = [
    ],
    deps = [
        ":unknown_attributes",
        "//common:cel_ast",
        "//common:compiler_common",
        "//common/ast",
        "//parser:operator",
        "//parser:parser_builder",
        "//parser:parser_factory",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "unknown_attributes",
    srcs = UNKNOWN_ATTRIBUTE_SOURCES,
    tags = [
    ],
    deps = [
        "//:auto_value",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_re2j_re2j",
    ],
)

cel_android_library(
    name = "unknown_attributes_android",
    srcs = UNKNOWN_ATTRIBUTE_SOURCES,
    tags = [
    ],
    deps = [
        "//:auto_value",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_re2j_re2j",
        "@maven_android//:com_google_guava_guava",
    ],
)

java_library(
    name = "cel_value_runtime_type_provider",
    srcs = ["CelValueRuntimeTypeProvider.java"],
    deps = [
        ":runtime_type_provider",
        ":unknown_attributes",
        "//common:error_codes",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/values",
        "//common/values:base_proto_cel_value_converter",
        "//common/values:base_proto_message_value_provider",
        "//common/values:cel_value",
        "//common/values:cel_value_provider",
        "//common/values:combined_cel_value_provider",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

cel_android_library(
    name = "cel_value_runtime_type_provider_android",
    srcs = ["CelValueRuntimeTypeProvider.java"],
    deps = [
        ":runtime_type_provider_android",
        ":unknown_attributes_android",
        "//common:error_codes",
        "//common:runtime_exception",
        "//common/annotations",
        "//common/values:base_proto_cel_value_converter_android",
        "//common/values:base_proto_message_value_provider_android",
        "//common/values:cel_value_android",
        "//common/values:cel_value_provider_android",
        "//common/values:combined_cel_value_provider_android",
        "//common/values:values_android",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven_android//:com_google_guava_guava",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "interpreter_util",
    srcs = ["InterpreterUtil.java"],
    tags = [
    ],
    deps = [
        ":accumulated_unknowns",
        ":evaluation_exception",
        ":unknown_attributes",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:org_jspecify_jspecify",
    ],
)

cel_android_library(
    name = "interpreter_util_android",
    srcs = ["InterpreterUtil.java"],
    visibility = ["//visibility:private"],
    deps = [
        ":accumulated_unknowns_android",
        ":evaluation_exception",
        ":unknown_attributes_android",
        "//common/annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:org_jspecify_jspecify",
    ],
)

java_library(
    name = "evaluation_listener",
    srcs = ["CelEvaluationListener.java"],
    tags = [
    ],
    deps = [
        "//common/ast",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

cel_android_library(
    name = "evaluation_listener_android",
    srcs = ["CelEvaluationListener.java"],
    visibility = ["//visibility:private"],
    deps = [
        "//common/ast:ast_android",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

cel_android_library(
    name = "lite_runtime_android",
    srcs = LITE_RUNTIME_SOURCES,
    tags = [
    ],
    deps = [
        ":evaluation_exception",
        ":function_binding_android",
        ":function_resolver_android",
        "//:auto_value",
        "//common:cel_ast_android",
        "//common:options",
        "//common/annotations",
        "//common/values:cel_value_provider_android",
        "//runtime/standard:standard_function_android",
        "@maven//:com_google_code_findbugs_annotations",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven_android//:com_google_guava_guava",
    ],
)

java_library(
    name = "concatenated_list_view",
    srcs = ["ConcatenatedListView.java"],
    # used_by_android
    visibility = ["//visibility:private"],
)

java_library(
    name = "accumulated_unknowns",
    srcs = ["AccumulatedUnknowns.java"],
    visibility = ["//visibility:private"],
    deps = [
        ":unknown_attributes",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

cel_android_library(
    name = "accumulated_unknowns_android",
    srcs = ["AccumulatedUnknowns.java"],
    visibility = ["//visibility:private"],
    deps = [
        ":unknown_attributes_android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)
